home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-29 | 17.1 KB | 387 lines | [TEXT/ttxt] |
- ************************************************************
- ************************************************************
-
- Mac F2C -- A FORTRAN-to-C translator for the Macintosh
-
- ************************************************************
- ************************************************************
-
- f2c kernel ⌐1989-1995 AT&T Bell Laboratories and Bellcore
- Macintosh Interface ⌐1994-1995 Igor Mikolic-Torreira
-
- This software is freeware: it may be used and copied freely so long as
- the copyright notices and associated documentation remain attached.
-
-
-
- CONTENTS
- *************************************************************
-
- A. WHAT IS Mac F2C
-
- B. WHAT IS NEW IN VERSION 1.1
-
- C. WHAT IS INCLUDED AND HOW IS IT ORGANIZED
-
- D. WHERE DO I GO FROM HERE╔
-
- E. CONTACTING THE AUTHOR
-
- F. CREDITS
-
- G. LICENSE AND OTHER ANNOYING LEGAL STUFF
-
-
-
- A. WHAT IS Mac F2C
- *************************************************************
-
- Mac F2C is a FORTRAN-to-C translator. It will read a file of FORTRAN
- code and produce a file of C code. When compiled and linked with the
- special support libraries included with Mac F2C, this C code will work
- just like the original FORTRAN code.
-
- Mac F2C is the Macintosh port of the UNIX program f2c developed at AT&T.
- AT&T permits the use of the f2c source code for non-profit purposes. You
- can get a copy of the f2c source code at netlib.att.com
-
- The minimum requirements to run Mac F2C are:
-
- (1) A 68020 or better
-
- (2) System 7.0 or later
-
- (3) At least 1 MB of available RAM (2 MB is preferred)
-
-
-
-
- B. WHAT IS NEW IN VERSION 1.1
- *************************************************************
-
- Version 1.1 has the following new features:
-
- - CodeWarrior compatible. The Mac F2C support libraries now
- compile under CodeWarrior and CodeWarrior project/library
- files are included. Example CodeWarrior projects are
- also included to illustrate how to use C code produced
- by Mac F2C with CodeWarrior.
-
- - Access to the more advanced '-N'-series f2c options
- (e.g., '-Nx', '-Nn', and similar options).
-
- - Can send Apple Events to THINK and CodeWarrior telling them
- that files have changed and/or telling them to do a 'Make'.
-
- - Allows you to enter UNIX-style option switches that Mac F2C
- passes directly to the f2c kernel.
-
- - Revised and expanded Apple Event suite includes a new event
- that accepts a string of UNIX-style option switches.
-
- - Updates the f2c kernel to AT&T's version of 13 November 1994.
-
- - A more thorough test program is included.
-
- - Support is provided for using Mac F2C output with C++
- (vice C) compilers.
-
- Version 1.1 also fixes the following bugs present in version 1.0:
-
- - Completely re-written preference file support eliminates a
- crash on some Macs running System 7.5.
-
- - Works around a bug in THINK's ANSI F2C support library that
- caused some transcendental functions to crash and/or return
- incorrect answers (THINK's ANSI library doesn't like to be
- compiled with the "Enums are always ints" option checked).
-
- - Eliminates situations where Mac F2C would quit out from under
- you when doing a drag&drop launch of Mac F2C.
-
- - Latest f2c kernel corrects several minor bugs in the
- translator itself.
-
-
- Users upgrading from previous versions of Mac F2C need to re-install ALL
- libraries and project files, including main.c and f2c.h. Both library
- source code and the options settings in the various project files have
- changed. See the more detailed instructions provided in the documentation
- folder for further information.
-
-
-
-
- C. WHAT IS INCLUDED AND HOW IS IT ORGANIZED
- *************************************************************
-
- The Mac F2C 1.1 distribution set contains the following items:
-
- (1) "Mac F2C v1.1 READ ME" -- This Read Me message.
-
- (2) "Mac F2C" -- the FORTRAN-to-C translator application, version 1.1.
-
- (3) "Mac F2C Documentation" -- a folder containing all relevant
- documentation for Mac F2C. This folder contains:
-
- - "INSTRUCTIONS (THINK)" -- instructions for using Mac F2C
- with Symantec's THINK C and C++ compilers.
-
- - "INSTRUCTIONS(CodeWarrior)" -- instructions for using Mac F2C
- with MetroWerk's CodeWarrior C compiler.
-
- - "AT&T Report 149.ps" -- a postscript file containing the AT&T
- report that serves as a compiler manual for Mac F2C.
-
- - "Mac F2C AppleEvents" -- a folder containing detailed information
- on how to drive Mac F2C using AppleEvents.
-
- - "Mac F2C & UNIX f2c" -- information on interchanging C code
- produced by Mac F2C on the Macintosh and the original f2c
- program on a UNIX machine.
-
- - "Mac F2C Known Bugs" -- summary of known bugs and suggestions
- for working around them.
-
- - "When Mac F2C code won't run╔" -- Things to check whenever the
- code produced by Mac F2C doesn't run correctly.
-
- - "If Floats Don't Display Right" -- a folder discussing a common
- bug in float-to-ASCII conversion routines (including those
- provided in Symantec's and MetroWerks' C and C++ libraries).
- It includes some code you might be able to use to fix the
- problem.
-
- - "For THINK v6 and Earlier Users" -- instructions for setting up
- Mac F2C to work with earlier versions of Symantec's THINK
- compiler. All the THINK project files included in this
- distribution have been made using THINK C version 7.0.4. This
- file provides guidance on how to create equivalent project
- files using earlier versions of THINK C.
-
- (4) "Mac F2C Libraries" -- a folder containing the libraries required to
- support programs translated by F2C. The libF77 library provides
- floating-point support; the libI77 library provides integer and I/O
- support. Both THINK and CodeWarrior project and library files are
- provided, along with all the source code. These need to be installed
- in the right places and re-built. Please read the appropriate
- version of the INSTRUCTIONS file for a detailed, step-by-step
- description of what to do with these files.
-
- (5) "Test Project ─" -- a folder containing a test FORTRAN program and
- the C output produced by Mac F2C. It also contains complete THINK
- and CodeWarrior projects to compile and run the test program. See
- the appropriate version of the INSTRUCTIONS file for a detailed
- description of how to use the contents of this folder to verify
- correct operation of Mac F2C.
-
- (6) "THINK Specific Stuff" -- a folder containing items specifically
- required to use Mac F2C with Symantec's THINK C compiler. This folder
- contains the following items:
-
- - "For 'Standard Libraries'" -- a folder containing versions of the
- ANSI, unix, IOStreams, and CPlusLib project files distributed with
- THINK C/C++ that have been modified to work with Mac F2C output.
- These libraries should be placed in the appropriate location and
- brought up to date. Please refer to the file "INSTRUCTIONS
- (THINK)" for detailed information.
-
- - "Build F2C Libraries" -- an AppleScript for bringing all the THINK
- versions of the Mac F2C support libraries up to date. Please
- refer to the file "INSTRUCTIONS (THINK)" for detailed information
- on how to use this script.
-
- - "For '(Project Models)'" -- a folder containing model Mac F2C
- THINK C and C++ projects. Please refer to the file "INSTRUCTIONS
- (THINK)" for detailed information on how to use the contents of
- this folder.
-
- (7) "CodeWarrior Specific Stuff" -- a folder containing items specifically
- required to use Mac F2C with MetroWerk's CodeWarrior C compiler. This
- folder contains the following items:
-
- - "Empty Mac F2C 68K Project ─" -- a folder containing an empty Mac
- F2C CodeWarrior project for producing 68k code. Please refer to the
- file "INSTRUCTIONS (CodeWarrior)" for detailed information on how
- to use the contents of this folder.
-
- - "Empty Mac F2C PPC Project ─" -- a folder containing an empty Mac
- F2C CodeWarrior project for producing PowerPC code. Please refer
- to the file "INSTRUCTIONS (CodeWarrior)" for detailed information
- on how to use the contents of this folder.
-
- - "MPW/Toolserver Tools" -- a folder containing Toolserver tools
- for use with CodeWarrior. Please refer to the file "Toolserver
- READ ME" contained in this folder for detailed information on how
- to use the contents of this folder.
-
- (6) "AT&T Report 149.ps" -- a postscript file containing AT&T Computing
- Science Technical Report No. 149. This report provides very detailed
- documentation on f2c, the UNIX program which is the core of
- Mac F2C. Consider it your compiler and language reference manual.
- All users should print out and read this report.
-
-
-
-
- D. WHERE DO I GO FROM HERE╔
- *************************************************************
-
- The next step is to read the set-up and use instructions. You should read
- either "INSTRUCTIONS (THINK)" or "INSTRUCTIONS (CodeWarrior)" depending on
- which compiler you plan to use. Mac F2C is _not_ ready to go out of the
- box, so please read these instructions to see how to set up the support
- libraries and use the C code produced by Mac F2C. I also strongly
- recommend using the included test program to verify correct operation of
- Mac F2C and the support libraries. Again, information on how to do
- this is provided in the two INSTRUCTIONS files.
-
- You should also look at the more detailed documentation on the
- FORTRAN-to-C compiler itself. The document "AT&T Report 149.ps" is a
- PostScript file which you can download to any PostScript printer. It will
- produce a copy of "AT&T Computing Science Technical Report No. 149." This
- report provides very detailed documentation on f2c, the UNIX program which
- is the translator at the core of Mac F2C. Consider this report your
- compiler and language reference manual. I recommend all users
- print out and read this report.
-
- If you want to drive Mac F2C with AppleEvents, check out the folder "Mac
- F2C Apple Events". It contains detailed information on sending Apple
- Events to Mac F2C. It also includes some sample AppleScripts and header
- files for use with your own code.
-
- Additional useful information appears in the documents contained in the
- folder "Mac F2C Documentation". Before sending a bug report please glance
- at "Mac F2C Known Bugs". If you plan on moving code between a UNIX machine
- and a Macintosh and/or will be mixing code translated by f2c on a UNIX
- machine and Mac F2C on a Macintosh, please look at "Mac F2C & UNIX f2c".
- If you have trouble getting the C code produced by Mac F2C to run
- correctly, read "When Mac F2C code won't run╔". Finally, if floating point
- values do not appear to round correctly when output, read the information
- in the folder "If Floats Don't Display Right".
-
-
-
- E. CONTACTING THE AUTHOR
- *************************************************************
-
- My name is Igor Mikolic-Torreira and I can be reached at
- igormt@alumni.caltech.edu.
-
- If you find Mac F2C useful, please drop me a note. If you really think it
- is the most useful thing in the whole world and worth its weight in gold,
- please donate that amount of gold to your favorite charity ;)
-
- I have started to keep a mailing list which I will use to distribute Mac
- F2C related information such as bug alerts, patches, and new versions. If
- you wish to be added to this mailing list, please send me an email
- specifically requesting to be added to this list. Also let me know if you
- are interested in being a beta-tester for future versions of Mac F2C.
-
- If you find any bugs or would like to request a particular feature, let me
- know. I will try to fix interface bugs or at least provide work-arounds
- promptly. I will forward compiler bugs to AT&T. If you believe you have a
- code generation bug, _please_ send me a sample of the FORTRAN code that
- produces the problem together with the C output and your THINK or
- CodeWarrior project file(s). If you can create a minimal example, that's
- even better and you will earn my eternal gratitude. Before sending me a
- bug report, please read "Mac F2C Known Bugs" as Mac F2C has some problems
- that I am quite aware of. If your translated programs compile without
- errors but don't run, take a look at the file "When Mac F2C Code Won't
- Run╔" for information on the most common problem with translated code and
- how to fix it.
-
- You can send comments and questions on any part of the Mac F2C package to
- me. However, I forward most questions related to Mac F2C's CodeWarrior
- support to Dirk Froehling (I don't have CodeWarrior). Dirk contributed all
- of the CodeWarrior support for this version of Mac F2C. He has graciously
- allowed me to distribute his email address. If you wish, you can send
- questions or comments on Mac F2C's CodeWarrior support directly to him at
- dirk@gaga.maschinenbau.uni-dortmund.de.
-
-
-
- F. CREDITS
- *************************************************************
-
- A lot of people have contributed to Mac F2C, either knowingly or
- unknowingly. Many thanks to....
-
- AT&T and Bellcore for developing f2c and allowing others to make use of the
- source code. Mac F2C v1.1 incorporates the f2c version of 13 Nov 1994.
-
- Jim Luther of Apple Macintosh Developer Technical Support for the
- "MoreFiles" collection of FileManager Utilities. Mac F2C incorporates
- MoreFiles 1.2.1.
-
- Gary Woodcock of Apple Computer for the "StdPrefsLib" library of routines
- to handle preferences and preference files. Mac F2C incorporates version
- 1.0 of the Standard Prefs Library (as distributed on the "develop
- Bookmark" CD).
-
- Jens Alfke of the AppleScript Team at Apple Computer for AEBuild and
- related AppleEvent utilities. Mac F2C incorporates his AEGizmos v1.3.4
- package (this includes AEBuild, AEPrint and other goodies). For anyone not
- familiar with AEBuild, it is by far the easiest way to build AppleEvent
- object descriptors. Hours of frustration are replaced by a few lines of
- easy to understand code. If you don't have it, get it!
-
- Dirk Froehling of Germany for figuring out how to make the support
- libraries compile under CodeWarrior and for providing CodeWarrior project
- files and libraries. All of the CodeWarrior support in v1.1 is due to
- Dirk (I unfortunately don't own a copy of CodeWarrior). Dirk also
- suggested many of the new features added since v1.0 -- including the
- interaction (via AppleEvents) with THINK and CodeWarrior.
-
- And last -- but certainly not least -- to my wife Beth for patiently
- tolerating many late nights when I paid more attention to Mac F2C than I
- did to her.
-
-
-
- G. LICENSE AND OTHER ANNOYING LEGAL STUFF
- *************************************************************
-
- The compiler engine of Mac F2C is based on the unix version of f2c and is
- Copyright 1990, 1993, 1994, 1995 by AT&T Bell Laboratories and Bellcore.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that the
- copyright notice and this permission notice and warranty disclaimer appear
- in supporting documentation, and that the names of AT&T Bell Laboratories
- or Bellcore or any of their entities not be used in advertising or
- publicity pertaining to distribution of the software without specific,
- written prior permission.
-
- AT&T and Bellcore disclaim all warranties with regard to this software,
- including all implied warranties of merchantability and fitness. In no
- event shall AT&T or Bellcore be liable for any special, indirect or
- consequential damages or any damages whatsoever resulting from loss of use,
- data or profits, whether in an action of contract, negligence or other
- tortious action, arising out of or in connection with the use or
- performance of this software.
-
-
- The Macintosh interface portion of Mac F2C was written and is
- Copyright 1994, 1995 by Igor Mikolic-Torreira.
-
- Permission to use, copy, modify, and distribute this software and its
- documentation for any purpose and without fee is hereby granted, provided
- that the above copyright notice appear in all copies and that both that the
- copyright notice and this permission notice and warranty disclaimer appear
- in supporting documentation, and that the name of Igor Mikolic-Torreira not
- be used in advertising or publicity pertaining to distribution of the
- software without specific, written prior permission.
-
- Igor Mikolic-Torreira disclaims all warranties with regard to this
- software, including all implied warranties of merchantability and fitness.
- In no event shall Igor Mikolic-Torreira be liable for any special, indirect
- or consequential damages or any damages whatsoever resulting from loss of
- use, data or profits, whether in an action of contract, negligence or other
- tortious action, arising out of or in connection with the use or
- performance of this software.
-
-
-
-